package ReverseList;

public class Text {
    public static void main(String[] args) {
        Linked linked = new Linked();
        linked.addLast(1);
        linked.addLast(2);
        linked.addLast(3);
        linked.addLast(4);
        linked.addLast(5);
        for (Integer integer : linked) {
            System.out.println(integer);
        }
        System.out.println("------------------------");
        Linked linked1 = linked.reverseMethod5(linked);
        for (Integer integer : linked1) {
            System.out.println(integer);
        }
    }
}
